home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume14 / mush6.0 / patch1 < prev    next >
Encoding:
Internet Message Format  |  1988-04-28  |  19.5 KB

  1. Subject:  v14i077:  Mush updates for SystemV, etc., Patch1
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: island!argv@sun.com (Dan Heller)
  7. Posting-number: Volume 14, Issue 77
  8. Archive-name: mush6.0/patch1
  9.  
  10. The patches included here apply mostly to System V sites and Pyramids.
  11. Also included is a file called Mailrc which can be used to make Mush look
  12. very much like ucb's Mail program. It was written by Bart Schaefer
  13. (ogcvax!schaefer@sun.com).  Test your new mush by sending him mail
  14. congratulating him on his upcoming wedding :-)
  15.  
  16. For more details (and lists of the new features), see README-6.1.
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of shell archive."
  25. # Contents:  README-6.1 Mailrc Diffs
  26. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  27. if test -f 'README-6.1' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'README-6.1'\"
  29. else
  30. echo shar: Extracting \"'README-6.1'\" \(3039 characters\)
  31. sed "s/^X//" >'README-6.1' <<'END_OF_FILE'
  32. The patches included here apply mostly to system-v sites.  However,
  33. you should include them if you are going to keep up to date with
  34. future pathes.  Here is a summary of the files and functions that
  35. have changed and why.
  36. X
  37. Also included with these update diffs is a file called Mailrc which
  38. can be used to make Mush look very much like ucb's Mail program. It was
  39. written by Bart Schaefer (ogcvax!schaefer@sun.com).  Test your new mush
  40. by sending him mail congratulating him on his upcoming wedding :-)
  41. X
  42. mush.h --
  43. X    Truncated version ID.
  44. X
  45. X    putchar() redefined fputc(c, stdout), fflush(stdout) because sys-v
  46. X    isn't getting newlines when in curses mode. Isn't stdout supposed
  47. X    to be line buffered?  Does setting cbreak or something change this?
  48. X    If this doesn't fix the problem for sys-v, add setbuf(stdout, NULL) at
  49. X    the top of main.c, but that shouldn't be necessary (in fact, none of
  50. X    this _should_ be necessary).
  51. X
  52. X    SIGCHLD may cause infinite loop on pyramid's cpp cuz they
  53. X    define SIGCHLD to be SIGCLD.  SIGCHLD is now only defined if it's
  54. X    not already defined.  If your system has SIGCHLD and SIGCLD defined
  55. X    to _different values_ and you have SYSV defined, you may need to
  56. X    check into this, but I doubt your system's that weird.
  57. X
  58. X    glob_flags is now u_long (helps lint)
  59. X
  60. loop.c --
  61. X    #ifdef SYSV around signal(SIGCHLD, ...) cuz sys-v doesn't really deal
  62. X    with it correctly.  Best just let it default and forget about it. Note
  63. X    that sys-v'ers won't be able to watch processes die using "debug" anymore.
  64. X
  65. commands.c --
  66. X    Printenv() now takes an argument.  "printenv _var_" will
  67. X    print the varname and value rather than all env variables.
  68. X
  69. mail.c --
  70. X    OLD_MAILER and OLD_MAIL now merged to OLD_MAILER.  Too confusing
  71. X    to have both and if either is used, both tend to be used.  Refer to
  72. X    README-6.0 for details.
  73. X
  74. print.c --
  75. X    yet more fixes for varargs.h people.  It seems that pyramid (sys-v/BSD)
  76. X    now have va_start() defined to have an open brace ( { ) and va_end()
  77. X    has the closing brace ( } ).  So, you can't have a starting block
  78. X    be inbetween each call.  Who writes that stuff?
  79. X
  80. strings.c --
  81. X    Sprintf() now supports varargs and has #ifdef VPRINTF checks.
  82. X    As it turns out, some systems don't have IOSTRG either, but I'm not
  83. X    really up to date on this one.  If you have a problem with it, just
  84. X    remove its reference in the routine and it should work anyway.
  85. X
  86. hdrs.c --
  87. X    compose_hdr() should run faster now (thus, any display of headers:
  88. X    'h', 'z', etc...) should be faster due to the code no longer computes
  89. X    the weekday name (Sun, Mon, etc..) unless specifically requested by %D
  90. X    (in which it takes the same amount of time as before).
  91. X
  92. curs_io.c/signals.c --
  93. X    added new function scrn_line which reads a line of text from a line
  94. X    on the curses screen for use by stdout.  It seems that sys-v curses
  95. X    package uses shorts instead of chars to represent each char on the
  96. X    screen.  I use #ifdef A_CHARTEXT to see if this applies to you.
  97. X
  98. END_OF_FILE
  99. if test 3039 -ne `wc -c <'README-6.1'`; then
  100.     echo shar: \"'README-6.1'\" unpacked with wrong size!
  101. fi
  102. # end of 'README-6.1'
  103. fi
  104. if test -f 'Mailrc' -a "${1}" != "-c" ; then 
  105.   echo shar: Will not clobber existing file \"'Mailrc'\"
  106. else
  107. echo shar: Extracting \"'Mailrc'\" \(1467 characters\)
  108. sed "s/^X//" >'Mailrc' <<'END_OF_FILE'
  109. X# .mushrc to cause Mush to emulate UCB Mail
  110. X# -- Bart Schaefer (schaefer@cse.ogc.edu)
  111. X#----------------------------------------------------------------------------
  112. X# Shortcomings:
  113. X#  Mush does not support the "noisy phone line" flags of Mail
  114. X#   (-i command line option or "set ignore" to ignore RUBOUT characters)
  115. X#  Mush will never remove a system mailbox (no "unset keep" equivalent)
  116. X#  See comments below on (lack of) command prefix recognition
  117. X#  Date shown in headers ought to be date received, but instead is date sent
  118. X#----------------------------------------------------------------------------
  119. X#
  120. X# Set up prompting, headers
  121. X#
  122. set prompt='& '
  123. set mil_time
  124. set hdr_format='%8.80a %D %M %-2N %5T  %l/%c "%.29s"'
  125. X#
  126. X# Set up mailing/replying miscellaneous
  127. X#
  128. set indent_str = "    "
  129. set reply_to_hdr auto_route
  130. X#
  131. X# Set up command interface
  132. X#  Note that a full emulation is difficult, because Mush does not support
  133. X#  command prefix recognition (e.g., Mail interprets "Rep" as "Reply").
  134. X#
  135. X# No cmd can use '\!*' because ignore_bang must be set.  Yuck.
  136. set ignore_bang
  137. X# This stuff is fine, but really needs prefix recognition.
  138. X#
  139. cmd Reply replysender
  140. cmd R replysender
  141. cmd chdir cd
  142. cmd chd cd
  143. cmd + next
  144. cmd ch cd
  145. cmd c copy
  146. cmd file folder
  147. cmd fi folder
  148. cmd hold preserve
  149. cmd ho preserve
  150. cmd reply replyall
  151. cmd r replyall
  152. cmd se set
  153. cmd shell sh
  154. cmd so source
  155. cmd un undelete
  156. cmd unread "flags U"    # "flags" is undocumented, but so is "unread" in Mail
  157. cmd uns unset
  158. X
  159. END_OF_FILE
  160. if test 1467 -ne `wc -c <'Mailrc'`; then
  161.     echo shar: \"'Mailrc'\" unpacked with wrong size!
  162. fi
  163. # end of 'Mailrc'
  164. fi
  165. if test -f 'Diffs' -a "${1}" != "-c" ; then 
  166.   echo shar: Will not clobber existing file \"'Diffs'\"
  167. else
  168. echo shar: Extracting \"'Diffs'\" \(12806 characters\)
  169. sed "s/^X//" >'Diffs' <<'END_OF_FILE'
  170. X
  171. X*** OLD/commands.c    Wed Apr  6 22:47:58 1988
  172. X--- commands.c    Tue Apr 26 20:08:49 1988
  173. X***************
  174. X*** 747,757 ****
  175. X      return -1;
  176. X  }
  177. X  
  178. X! Printenv()
  179. X  {
  180. X!     char **e = environ;
  181. X!     while (*e)
  182. X!     wprint("%s\n", *e++);
  183. X      return -1;
  184. X  }
  185. X  
  186. X--- 747,759 ----
  187. X      return -1;
  188. X  }
  189. X  
  190. X! Printenv(argc, argv)
  191. X! char **argv;
  192. X  {
  193. X!     char **e;
  194. X!     for (e = environ; *e; e++)
  195. X!     if (argc < 1 || !strncmp(*e, argv[1]))
  196. X!         wprint("%s\n", *e);
  197. X      return -1;
  198. X  }
  199. X  
  200. X*** OLD/curses.c    Wed Apr  6 22:47:58 1988
  201. X--- curses.c    Wed Apr 27 21:48:35 1988
  202. X***************
  203. X*** 120,127 ****
  204. X      if (isoff(glob_flags, CNTD_CMD)) {
  205. X      (void) check_new_mail();
  206. X      curlin = max(1, current_msg - n_array[0] + 1);
  207. X!     (void) strncpy(buf, stdscr->_y[curlin], COLS-1);
  208. X!     buf[COLS-1] = 0; /* strncpy does not null terminate */
  209. X      if (ison(glob_flags, REV_VIDEO) && msg_cnt)
  210. X          STANDOUT(curlin, 0, buf);
  211. X      mail_status(0);
  212. X--- 120,126 ----
  213. X      if (isoff(glob_flags, CNTD_CMD)) {
  214. X      (void) check_new_mail();
  215. X      curlin = max(1, current_msg - n_array[0] + 1);
  216. X!     scrn_line(curlin, buf);
  217. X      if (ison(glob_flags, REV_VIDEO) && msg_cnt)
  218. X          STANDOUT(curlin, 0, buf);
  219. X      mail_status(0);
  220. X***************
  221. X*** 707,711 ****
  222. X--- 706,726 ----
  223. X      }
  224. X      turnoff(glob_flags, DO_UPDATE);
  225. X      return 1; /* make sure bottom line is clear and no reverse video */
  226. X+ }
  227. X+ 
  228. X+ scrn_line(line, buf)
  229. X+ char *buf;
  230. X+ {
  231. X+ #ifndef A_CHARTEXT
  232. X+     (void) strncpy(buf, stdscr->_y[line], COLS-1);
  233. X+     buf[COLS-1] = 0; /* strncpy does not null terminate */
  234. X+ #else
  235. X+     int n;
  236. X+ 
  237. X+     for (n = 0; n < COLS; n++)
  238. X+     if ((buf = mvinch(curline, n) & A_CHARTEXT) == '\0')
  239. X+         break;
  240. X+     buf[n] = '\0';
  241. X+ #endif /* A_CHARTEXT */
  242. X  }
  243. X  #endif /* CURSES */
  244. X*** OLD/hdrs.c    Wed Apr  6 22:48:00 1988
  245. X--- hdrs.c    Tue Apr 26 19:32:11 1988
  246. X***************
  247. X*** 253,259 ****
  248. X      register char *p, *b;
  249. X      char from[256], subject[256], date[17], lines[16], chars[16], line[256];
  250. X      char to[256], addr[256], name[256], status[2];
  251. X!     char Day[3], Mon[4], Tm[8], Yr[5], Wkday[4];
  252. X  
  253. X      /* status of the message */
  254. X      if (ison(msg[cnt].m_flags, DELETE))
  255. X--- 253,259 ----
  256. X      register char *p, *b;
  257. X      char from[256], subject[256], date[17], lines[16], chars[16], line[256];
  258. X      char to[256], addr[256], name[256], status[2];
  259. X!     char Day[3], Mon[4], Tm[8], Yr[5], Wkday[4], *date_p;
  260. X  
  261. X      /* status of the message */
  262. X      if (ison(msg[cnt].m_flags, DELETE))
  263. X***************
  264. X*** 319,326 ****
  265. X      (void) get_name_n_addr(from, name, addr);
  266. X      }
  267. X  
  268. X!     if (p = msg_date(cnt))
  269. X!     date_to_string(p, Yr, Mon, Day, Wkday, Tm, date);
  270. X  
  271. X      (void) sprintf(lines, "%d", msg[cnt].m_lines);
  272. X      (void) sprintf(chars, "%ld", msg[cnt].m_size);
  273. X--- 319,327 ----
  274. X      (void) get_name_n_addr(from, name, addr);
  275. X      }
  276. X  
  277. X!     if (date_p = msg_date(cnt))
  278. X!     /* don't take weekday unless specified explicitly.  See 'D' below */
  279. X!     date_to_string(date_p, Yr, Mon, Day, NULL, Tm, date);
  280. X  
  281. X      (void) sprintf(lines, "%d", msg[cnt].m_lines);
  282. X      (void) sprintf(chars, "%ld", msg[cnt].m_size);
  283. X***************
  284. X*** 394,400 ****
  285. X          when 'M': p2 = Mon;
  286. X          when 'Y': p2 = Yr;
  287. X          when 'N': p2 = Day;
  288. X!         when 'D': p2 = Wkday;
  289. X          otherwise: continue; /* unknown formatting char */
  290. X          }
  291. X          len = strlen(sprintf(b, fmt, p2));
  292. X--- 395,409 ----
  293. X          when 'M': p2 = Mon;
  294. X          when 'Y': p2 = Yr;
  295. X          when 'N': p2 = Day;
  296. X!         when 'D': {
  297. X!             /* specifying weekday name (sun, mon, tue, etc..) can be
  298. X!              * very slow due to lots of *,/, and % operators.
  299. X!              */
  300. X!             char unused[16]; /* for date_to_string */
  301. X!             if (*(p2 = Wkday) == '\0')
  302. X!             (void) date_to_string(date_p, NULL, NULL, NULL,
  303. X!                           p2, NULL, unused);
  304. X!         }
  305. X          otherwise: continue; /* unknown formatting char */
  306. X          }
  307. X          len = strlen(sprintf(b, fmt, p2));
  308. X*** OLD/loop.c    Wed Apr  6 22:48:00 1988
  309. X--- loop.c    Tue Apr 26 18:49:13 1988
  310. X***************
  311. X*** 51,57 ****
  312. X      (void) signal(SIGQUIT, catch);
  313. X      (void) signal(SIGHUP, catch);
  314. X      (void) signal(SIGTERM, catch);
  315. X!     (void) signal(SIGCHLD, sigchldcatcher);
  316. X      (void) signal(SIGPIPE, SIG_IGN); /* if pager is terminated before end */
  317. X  
  318. X      turnoff(glob_flags, IGN_SIGS);
  319. X--- 51,63 ----
  320. X      (void) signal(SIGQUIT, catch);
  321. X      (void) signal(SIGHUP, catch);
  322. X      (void) signal(SIGTERM, catch);
  323. X!     (void) signal(SIGCHLD,
  324. X! #ifndef SYSV
  325. X!                sigchldcatcher
  326. X! #else /* SYSV */
  327. X!                SIG_DFL
  328. X! #endif /* SYSV */
  329. X!                );
  330. X      (void) signal(SIGPIPE, SIG_IGN); /* if pager is terminated before end */
  331. X  
  332. X      turnoff(glob_flags, IGN_SIGS);
  333. X***************
  334. X*** 97,103 ****
  335. X       * (current message, deleted, unread, etc) are found in mail_status.
  336. X       */
  337. X      mail_status(1);
  338. X!     if (Getstr(line, 256, 0) > -1)
  339. X          p = line;
  340. X      else {
  341. X          if (p = do_set(set_options, "ignoreeof")) {
  342. X--- 103,109 ----
  343. X       * (current message, deleted, unread, etc) are found in mail_status.
  344. X       */
  345. X      mail_status(1);
  346. X!     if (Getstr(line, sizeof(line), 0) > -1)
  347. X          p = line;
  348. X      else {
  349. X          if (p = do_set(set_options, "ignoreeof")) {
  350. X*** OLD/mail.c    Wed Apr  6 22:48:01 1988
  351. X--- mail.c    Tue Apr 26 20:09:58 1988
  352. X***************
  353. X*** 1137,1150 ****
  354. X  
  355. X      /* Make folders conform to RFC-822 by adding From: and Date: headers.
  356. X       * Some older mailers (binmail, execmail, delivermail), don't add
  357. X!      * these headers to the MTA, so add them for OLD_MAIL systems.
  358. X       */
  359. X      for (size = 0; size < next_file; size++) {
  360. X      time_t t;
  361. X! #ifndef OLD_MAIL
  362. X      if (size == 0)
  363. X          continue;
  364. X! #endif /* OLD_MAIL */
  365. X      (void) time(&t);
  366. X      if (size > 0) {
  367. X  #ifndef MSG_SEPARATOR
  368. X--- 1137,1150 ----
  369. X  
  370. X      /* Make folders conform to RFC-822 by adding From: and Date: headers.
  371. X       * Some older mailers (binmail, execmail, delivermail), don't add
  372. X!      * these headers to the MTA, so add them for OLD_MAILER systems.
  373. X       */
  374. X      for (size = 0; size < next_file; size++) {
  375. X      time_t t;
  376. X! #ifndef OLD_MAILER
  377. X      if (size == 0)
  378. X          continue;
  379. X! #endif /* OLD_MAILER */
  380. X      (void) time(&t);
  381. X      if (size > 0) {
  382. X  #ifndef MSG_SEPARATOR
  383. X*** OLD/msgs.c  Wed Apr  6 22:48:02 1988
  384. X--- msgs.c      Tue Apr 26 20:14:45 1988
  385. X***************
  386. X*** 305,310 ****
  387. X--- 307,313 ----
  388. X          (void) fclose(mail_fp);
  389. X          return;
  390. X      }
  391. X+     (void) fseek(tmpf, 0L, 2); /* assure we're at the end of the file */
  392. X      } else if (msg_cnt)
  393. X      (void) fseek(tmpf, msg[msg_cnt-1].m_offset+msg[msg_cnt-1].m_size,L_SET);
  394. X  
  395. X*** OLD/mush.h    Wed Apr  6 22:48:02 1988
  396. X--- mush.h    Tue Apr 26 21:09:52 1988
  397. X***************
  398. X*** 1,6 ****
  399. X  /* @(#)mush.h    (c) copyright 1986 (Dan Heller) */
  400. X  
  401. X! #define VERSION "Mail User's Shell (Vers 6.0) Sat Apr  2 19:36:07 PST 1988"
  402. X  
  403. X  #include "config.h"
  404. X  
  405. X--- 1,6 ----
  406. X  /* @(#)mush.h    (c) copyright 1986 (Dan Heller) */
  407. X  
  408. X! #define VERSION "Mail User's Shell (6.1 4/26/88)"
  409. X  
  410. X  #include "config.h"
  411. X  
  412. X***************
  413. X*** 78,85 ****
  414. X  #ifdef putchar
  415. X  #undef putchar
  416. X  #endif /* putchar */
  417. X! #define putchar(c)    fputc(c, stdout)
  418. X! #define bell()         fputc('\007', stderr)
  419. X  
  420. X  /* For error recovery purposes, send keyboard generated signals to a special
  421. X   * routine (interrupt) to set a global flag (WAS_INTR) and return to the
  422. X--- 78,85 ----
  423. X  #ifdef putchar
  424. X  #undef putchar
  425. X  #endif /* putchar */
  426. X! #define putchar(c)    fputc(c, stdout), fflush(stdout)
  427. X! #define bell()         fputc('\007', stderr), fflush(stderr)
  428. X  
  429. X  /* For error recovery purposes, send keyboard generated signals to a special
  430. X   * routine (interrupt) to set a global flag (WAS_INTR) and return to the
  431. X***************
  432. X*** 181,190 ****
  433. X  #endif /* F_OK */
  434. X  typedef    unsigned long    u_long;
  435. X  #define vfork   fork
  436. X! #ifdef SIGCHLD
  437. X! #undef SIGCHLD
  438. X! #endif /* SIGCHLD */
  439. X  #define SIGCHLD SIGCLD
  440. X  #endif /* SYSV */
  441. X  
  442. X  #if !defined(SUNTOOL) && !defined(CURSES)
  443. X--- 181,189 ----
  444. X  #endif /* F_OK */
  445. X  typedef    unsigned long    u_long;
  446. X  #define vfork   fork
  447. X! #ifndef SIGCHLD
  448. X  #define SIGCHLD SIGCLD
  449. X+ #endif /* SIGCHLD */
  450. X  #endif /* SYSV */
  451. X  
  452. X  #if !defined(SUNTOOL) && !defined(CURSES)
  453. X***************
  454. X*** 277,283 ****
  455. X  #define NO_FLG        0
  456. X  
  457. X  /* various flags */
  458. X! long   glob_flags;    /* global boolean flags thruout the whole program */
  459. X  #define DO_UPDATE   1    /* check for changes to avoid unnecessary copyback */
  460. X  #define REV_VIDEO   2    /* reverse video for curses or toolmode */
  461. X  #define CONT_PRNT   3    /* continue to print (maybe a printf) without a '\n' */
  462. X--- 276,282 ----
  463. X  #define NO_FLG        0
  464. X  
  465. X  /* various flags */
  466. X! u_long   glob_flags;    /* global boolean flags thruout the whole program */
  467. X  #define DO_UPDATE   1    /* check for changes to avoid unnecessary copyback */
  468. X  #define REV_VIDEO   2    /* reverse video for curses or toolmode */
  469. X  #define CONT_PRNT   3    /* continue to print (maybe a printf) without a '\n' */
  470. X*** OLD/signals.c    Wed Apr  6 22:48:03 1988
  471. X--- signals.c    Wed Apr 27 21:36:43 1988
  472. X***************
  473. X*** 179,186 ****
  474. X              msg_cnt) {
  475. X          int curlin = max(1, current_msg - n_array[0] + 1);
  476. X          char buf[256];
  477. X!         (void) strncpy(buf, stdscr->_y[curlin], COLS-1);
  478. X!         buf[COLS-1] = 0; /* strncpy does not null terminate */
  479. X          STANDOUT(curlin, 0, buf);
  480. X          }
  481. X          print("Stopping...");
  482. X--- 179,185 ----
  483. X              msg_cnt) {
  484. X          int curlin = max(1, current_msg - n_array[0] + 1);
  485. X          char buf[256];
  486. X!         scrn_line(curlin, buf);
  487. X          STANDOUT(curlin, 0, buf);
  488. X          }
  489. X          print("Stopping...");
  490. X
  491. X*** OLD/print.c    Thu Apr 28 22:45:28 1988
  492. X--- print.c    Thu Apr 28 22:45:59 1988
  493. X***************
  494. X*** 1,3 ****
  495. X--- 1,4 ----
  496. X+ 
  497. X  /* @(#)print.c    2.4    (c) copyright 10/15/86 (Dan Heller) */
  498. X  
  499. X  #include "mush.h"
  500. X***************
  501. X*** 36,43 ****
  502. X      static int x; /* position on line saved for continued prints */
  503. X      char *p; /* same type as struct file _ptr,_buf in stdio.h */
  504. X  
  505. X-     va_start(args); /* have args point to the beginning of argument stack */
  506. X- 
  507. X  #ifdef CURSES
  508. X      if (iscurses) {
  509. X      if (isoff(glob_flags, CONT_PRNT))
  510. X--- 37,42 ----
  511. X***************
  512. X*** 45,72 ****
  513. X      } else
  514. X  #endif /* CURSES */
  515. X      if (istool < 2) {
  516. X  #ifdef VPRINTF
  517. X          vprintf(fmt, args);
  518. X  #else /* VPRINTF */
  519. X          _doprnt(fmt, args, stdout);
  520. X  #endif /* VPRINTF */
  521. X-         fflush(stdout);
  522. X          va_end(args);
  523. X          return;
  524. X      }
  525. X  #ifdef VPRINTF
  526. X!     if (fmt)
  527. X!     vsprintf(msgbuf, fmt, args); /* NULL in fmt reprints last msg */
  528. X  #else /* VPRINTF */
  529. X!     foo._cnt = BUFSIZ;
  530. X!     foo._base = foo._ptr = msgbuf; /* may have to be cast(unsigned char *) */
  531. X!     foo._flag = _IOWRT+_IOSTRG;
  532. X!     if (fmt) {   /* passing NULL (not "") reprints last message */
  533. X!     (void) _doprnt(fmt, args, &foo);
  534. X!     *foo._ptr = '\0'; /* plant terminating null character */
  535. X      }
  536. X- #endif /* VPIRNTF */
  537. X-     va_end(args);
  538. X      p = msgbuf;
  539. X      if (iscurses || istool)
  540. X      while (p = index(p, '\n'))
  541. X--- 44,72 ----
  542. X      } else
  543. X  #endif /* CURSES */
  544. X      if (istool < 2) {
  545. X+         va_start(args);
  546. X  #ifdef VPRINTF
  547. X          vprintf(fmt, args);
  548. X  #else /* VPRINTF */
  549. X          _doprnt(fmt, args, stdout);
  550. X  #endif /* VPRINTF */
  551. X          va_end(args);
  552. X+         fflush(stdout);
  553. X          return;
  554. X      }
  555. X+     if (fmt) {
  556. X+         va_start(args);
  557. X  #ifdef VPRINTF
  558. X!         vsprintf(msgbuf, fmt, args); /* NULL in fmt reprints last msg */
  559. X  #else /* VPRINTF */
  560. X!         foo._cnt = BUFSIZ;
  561. X!         foo._base = foo._ptr = msgbuf; /* may have to be cast(unsigned char *) */
  562. X!         foo._flag = _IOWRT+_IOSTRG;
  563. X!         (void) _doprnt(fmt, args, &foo);
  564. X!         *foo._ptr = '\0'; /* plant terminating null character */
  565. X! #endif /* VPRINTF */
  566. X!         va_end(args);
  567. X      }
  568. X      p = msgbuf;
  569. X      if (iscurses || istool)
  570. X      while (p = index(p, '\n'))
  571. X***************
  572. X*** 88,93 ****
  573. X--- 88,94 ----
  574. X          turnon(glob_flags, CNTD_CMD); /* display ...continue... prompt */
  575. X      }
  576. X      turnoff(glob_flags, CONT_PRNT);
  577. X+     fflush(stdout); /* some sys-v's aren't fflushing \n's */
  578. X      return;
  579. X      }
  580. X  #endif /* CURSES */
  581. X***************
  582. X*** 117,125 ****
  583. X      char msgbuf[BUFSIZ]; /* we're not getting huge strings */
  584. X      va_list args;
  585. X  
  586. X-     va_start(args);
  587. X- 
  588. X      if (istool < 2) {
  589. X  #ifdef VPRINTF
  590. X      vprintf(fmt, args);
  591. X  #else /* VPRINTF */
  592. X--- 118,125 ----
  593. X      char msgbuf[BUFSIZ]; /* we're not getting huge strings */
  594. X      va_list args;
  595. X  
  596. X      if (istool < 2) {
  597. X+     va_start(args);
  598. X  #ifdef VPRINTF
  599. X      vprintf(fmt, args);
  600. X  #else /* VPRINTF */
  601. X***************
  602. X*** 131,136 ****
  603. X--- 131,137 ----
  604. X      }
  605. X      if (!fmt)
  606. X      return;
  607. X+     va_start(args);
  608. X  #ifdef VPRINTF
  609. X      vsprintf(msgbuf, fmt, args); /* NULL in fmt reprints last msg */
  610. X  #else /* VPRINTF */
  611. X***************
  612. X*** 140,145 ****
  613. X--- 141,147 ----
  614. X      _doprnt(fmt, args, &foo); /* format like printf into msgbuf via foo */
  615. X      *foo._ptr = '\0'; /* plant terminating null character */
  616. X  #endif /* VPRINTF */
  617. X+     va_end(args);
  618. X      Addstr(msgbuf);  /* addstr() will scroll if necessary */
  619. X  }
  620. X  
  621. X***************
  622. X*** 183,185 ****
  623. X--- 185,188 ----
  624. X  {
  625. X      print("");
  626. X  }
  627. X+ 
  628. END_OF_FILE
  629. if test 12806 -ne `wc -c <'Diffs'`; then
  630.     echo shar: \"'Diffs'\" unpacked with wrong size!
  631. fi
  632. # end of 'Diffs'
  633. fi
  634. echo shar: End of shell archive.
  635. exit 0
  636.